﻿using Dapper.Contrib.Extensions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Areaexportimg.Model
{
    [Table("`geodistrict`")]
    public class GeoDistrictEntity
    {
        [ExplicitKey]
        public string Id { get; set; }

        public int Level { get; set; }

        public string NameAbbrevation { get; set; }

        public string Name { get; set; }

        [JsonConverter(typeof(StringEnumConverter))]
        public AdminType AdminType { get; set; }

        public List<GeoDistrictEntity> Child { get; set; } = new List<GeoDistrictEntity>();

        public string CityCode { get; set; }

        public string ParentCityCode { get; set; }

        public List<RegionC> Points { get; set; }

        public double Lat { get; set; }

        [JsonProperty("lnt")]
        public double Lng { get; set; }

        public string EnglishAbbrevation { get; set; }

        public string English { get; set; }

        public List<GeoDataEntity> GeoData
        {
            get; set;
        } = new List<GeoDataEntity>();
    }

    public class RegionC
    {
        public string Region { get; set; }
    }
}
